const mini = require("html-minifier").minify;
const fs = require("fs");
const minify = (data) => {
    return mini(data, {
        removeComments: true,
        minifyJS: true,
        minifyCSS: true,
        collapseWhitespace: true,
        collapseInlintTagWhitespace: true,
        keepClosesingSlash: true,
    })
}

let html = fs.readFileSync("./index.dev.html").toString();
fs.writeFileSync('index.html', minify(html));